#ifndef KMYIMAGE_H
#define KMYIMAGE_H

//#include <QImage>
#include <string>

//#include "glwidget.h"
#include "KmyStructDef.h"
#include "PlatformDef.h"
#include "KmyITexture.h"

using namespace std;

/**
  * 大图
  * 包含一整张大图的数据和子图的范围
  */
class KmyImagePak
{
public:
    KmyImagePak();
    KmyImagePak(KmyITexture *image, int num,
              St_Rect *range);
    virtual ~KmyImagePak();
    virtual void finalize();

    KmyITexture* image;

    int img_num;

    St_Rect* ranges;

    St_Rect *getSubImageClip(int id);
//    IImage* getImage(int img_id);

//    void draw(GLWidget *g, int img_id,
//              int x, int y, int w, int h,
//              float z, float alpha = 1.0f, int angle = 0, bool flip = false);

//    void drawRegion(GLWidget *g, int img_id,
//                    int sx, int sy, int sw, int sh,
//                    int dx, int dy, int dw, int dh,
//                    float z, float alpha = 1.0f, int angle = 0, bool flip = false);


};

#endif // KMYIMAGE_H
